package com.wmwsystems.inc.demo.wsclient;

import com.wmwsystems.inc.demo.wsdl.PullAirCompaniesRequest;
import com.wmwsystems.inc.demo.wsdl.PullAirCompaniesResponse;
import org.springframework.ws.client.core.support.WebServiceGatewaySupport;
import org.springframework.ws.soap.client.core.SoapActionCallback;


public class WsClient
    extends WebServiceGatewaySupport {

    public PullAirCompaniesResponse pullAirCompanies(long requestVersion) {
        PullAirCompaniesRequest request = new PullAirCompaniesRequest();
        request.setVersion(requestVersion);

        PullAirCompaniesResponse response = (PullAirCompaniesResponse) getWebServiceTemplate().marshalSendAndReceive(request,
                new SoapActionCallback("http://realobs.com/outgoing/services/IFlightsSynchronization/PullAirCompanies"));

        return response;

    }

}
